package StudyCode.summary.Basic.mystring;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class StringContainAnyPunctuation {

	public static void main(String[] args) {
		System.out.println(isContainAnyPunctuation("111"));
		System.out.println(isContainAnyPunctuation("11@1"));
		System.out.println(isContainAnyPunctuation("11!1"));
		System.out.println(isContainAnyPunctuation("11==1"));
	}

	public static boolean isContainAnyPunctuation(String str) {
		Pattern patPunctuation = Pattern.compile("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？]");
		Matcher matcher = patPunctuation.matcher(str);
		return matcher.find();
	}
}
